package es.unileon.prg2.patterns.composite;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

import es.unileon.prg2.patterns.handler.GenericId;
import es.unileon.prg2.patterns.handler.Handler;
import es.unileon.prg2.patterns.handler.LongName;

public class ProvinceLongNameTests {
	private ProvinceLongName leon;
	private Handler idLeon;

	@Before
	public void setUp() throws Exception {
		this.idLeon = new LongName ("Leon");
		this.leon = new ProvinceLongName(this.idLeon);
	}

	@Test
	public void testProvinceLongNameString() {
		ProvinceLongName zamora = new ProvinceLongName("Zamora");
		assertEquals(zamora.getId().toString(), "Zamora");
	}
	
	@Test
	public void testProvinceLongNameHandler() {
		assertEquals(this.leon.getId().toString(), this.idLeon.toString());
	}

	
	@Test
	public void testGetIdOk() {
		assertEquals(this.leon.getId().toString(), this.idLeon.toString());
	}

}
